Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-package] silence more logs in unit tests #5227

Merged
merged 3 commits into from
May 23, 2022
Merged

Conversation

jameslamb
Copy link
Collaborator

Contributes to #4862.

This PR proposes additional changes to silence logs in the R package's tests.

Notes for Reviewers

As of #5209, it's safe to change the verbosity in calls to lightgbm() without worrying about validation and early stopping.

Using the following code, I found that this PR reduces the output of the R package's tests from 636 lines to 73 lines.

sh build-cran-package --no-build-vignettes
R CMD INSTALL --with-keep.source ./lightgbm_3.3.2.99.tar.gz
cd R-package/tests
Rscript testthat.R > ../../out.log 2>&1
echo "log lines from tests: $(cat ../../out.log | wc -l)"

@jameslamb
Copy link
Collaborator Author

I see what looks like a bunch of networking-related issues across different R CI jobs.

r-package (windows-latest, MINGW, R 3.6, cmake) (build link)

Downloading https://cran.r-project.org/bin/windows/base/old/3.6.3/R-3.6.3-win.exe
Invoke-WebRequest: D:\a\LightGBM\LightGBM\.ci\test_r_package_windows.ps1:12
Line |
  12 |      Invoke-WebRequest -Uri $url -OutFile $destfile
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | No connection could be made because the target machine actively refused it.

r-sanitizers (ubuntu-latest, R-devel, gcc ASAN/UBSAN) (build link)

Warning: unable to access index for repository https://cran.r-project.org/src/contrib:
  cannot open URL 'https://cran.r-project.org/src/contrib/PACKAGES'

And I see CRAN unavailable from my laptop as well.

curl -I cran.r-project.org
# curl: (7) Failed to connect to cran.r-project.org port 80: Connection refused

curl -I http://cran.r-project.org
# curl: (7) Failed to connect to cran.r-project.org port 80: Connection refused

curl -I https://cran.r-project.org
# curl: (7) Failed to connect to cran.r-project.org port 443: Connection refused

image

I think CRAN may be down.

@StrikerRUS
Copy link
Collaborator

I think CRAN may be down.

Yeah, it seems so. Still down...

@jameslamb
Copy link
Collaborator Author

jameslamb commented May 23, 2022

Looks like it is STILL down 😫

Dirk makes a good point in https://stat.ethz.ch/pipermail/r-devel/2022-May/081749.html ...other mirrors exist. I'm going to push a commit PR proposing switching to another mirror like https://cran.rstudio.com/, which is up right now and which I expect might continue to have higher availability, since it is backed by a for-profit company and presumably supported by an on-call support staff.

@jameslamb
Copy link
Collaborator Author

jameslamb commented May 23, 2022

Just updated this to latest master now that #5230 has been merged. That should help with CI. Will merge this if CI jobs all pass.

@jameslamb jameslamb merged commit dd3294d into master May 23, 2022
@jameslamb jameslamb deleted the r/more-verbosity branch May 23, 2022 04:15
@jameslamb jameslamb mentioned this pull request Oct 7, 2022
40 tasks
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants